/**
 * 
 */
package com.demo2do.boyle.client.entity.protocol.wechat;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author Wilson
 */
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class RequestMessage extends Message {

    @XmlElement(name = "MsgId")
    protected Long id;

    @XmlElement(name = "Content")
    protected String content;

    @XmlElement(name = "PicUrl")
    protected String pictureUrl;

    @XmlElement(name = "MediaId")
    protected String mediaId;

    @XmlElement(name = "ThumbMediaId")
    protected String thumbMediaId;

    @XmlElement(name = "Format")
    protected String format;

    @XmlElement(name = "Recognition")
    protected String recognition;

    @XmlElement(name = "Location_X")
    protected Double locationX;

    @XmlElement(name = "Location_Y")
    protected Double locationY;

    @XmlElement(name = "Scale")
    protected Integer scale;

    @XmlElement(name = "Label")
    protected String label;

    @XmlElement(name = "Title")
    protected String title;

    @XmlElement(name = "Description")
    protected String description;

    @XmlElement(name = "Url")
    protected String url;

    @XmlElement(name = "Event")
    protected String event;

    @XmlElement(name = "EventKey")
    protected String eventKey;

    @XmlElement(name = "Ticket")
    protected String ticket;

    @XmlElement(name = "Latitude")
    protected Double latitude;

    @XmlElement(name = "Longitude")
    protected Double longitude;

    @XmlElement(name = "Precision")
    protected Double precision;

    /**
     * 
     * @return
     */
    public boolean isMenuClicked() {
        return this.getType().equalsIgnoreCase("event")
                && this.getEvent().equalsIgnoreCase("CLICK");
    }

    /**
     * 
     * @return
     */
    public boolean isSubscribe() {
        return this.getType().equalsIgnoreCase("event")
                && this.getEvent().equalsIgnoreCase("SUBSCRIBE");
    }

    /**
     * 
     * @return
     */
    public boolean isTextMessage() {
        return this.getType().equalsIgnoreCase("text");
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the content
     */
    public String getContent() {
        return content;
    }

    /**
     * @return the pictureUrl
     */
    public String getPictureUrl() {
        return pictureUrl;
    }

    /**
     * @return the mediaId
     */
    public String getMediaId() {
        return mediaId;
    }

    /**
     * @return the thumbMediaId
     */
    public String getThumbMediaId() {
        return thumbMediaId;
    }

    /**
     * @return the format
     */
    public String getFormat() {
        return format;
    }

    /**
     * @return the recognition
     */
    public String getRecognition() {
        return recognition;
    }

    /**
     * @return the locationX
     */
    public Double getLocationX() {
        return locationX;
    }

    /**
     * @return the locationY
     */
    public Double getLocationY() {
        return locationY;
    }

    /**
     * @return the scale
     */
    public Integer getScale() {
        return scale;
    }

    /**
     * @return the label
     */
    public String getLabel() {
        return label;
    }

    /**
     * @return the title
     */
    public String getTitle() {
        return title;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @return the url
     */
    public String getUrl() {
        return url;
    }

    /**
     * @return the event
     */
    public String getEvent() {
        return event;
    }

    /**
     * @return the eventKey
     */
    public String getEventKey() {
        return eventKey;
    }

    /**
     * @return the ticket
     */
    public String getTicket() {
        return ticket;
    }

    /**
     * @return the latitude
     */
    public Double getLatitude() {
        return latitude;
    }

    /**
     * @return the longitude
     */
    public Double getLongitude() {
        return longitude;
    }

    /**
     * @return the precision
     */
    public Double getPrecision() {
        return precision;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param content the content to set
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * @param pictureUrl the pictureUrl to set
     */
    public void setPictureUrl(String pictureUrl) {
        this.pictureUrl = pictureUrl;
    }

    /**
     * @param mediaId the mediaId to set
     */
    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }

    /**
     * @param thumbMediaId the thumbMediaId to set
     */
    public void setThumbMediaId(String thumbMediaId) {
        this.thumbMediaId = thumbMediaId;
    }

    /**
     * @param format the format to set
     */
    public void setFormat(String format) {
        this.format = format;
    }

    /**
     * @param recognition the recognition to set
     */
    public void setRecognition(String recognition) {
        this.recognition = recognition;
    }

    /**
     * @param locationX the locationX to set
     */
    public void setLocationX(Double locationX) {
        this.locationX = locationX;
    }

    /**
     * @param locationY the locationY to set
     */
    public void setLocationY(Double locationY) {
        this.locationY = locationY;
    }

    /**
     * @param scale the scale to set
     */
    public void setScale(Integer scale) {
        this.scale = scale;
    }

    /**
     * @param label the label to set
     */
    public void setLabel(String label) {
        this.label = label;
    }

    /**
     * @param title the title to set
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @param url the url to set
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * @param event the event to set
     */
    public void setEvent(String event) {
        this.event = event;
    }

    /**
     * @param eventKey the eventKey to set
     */
    public void setEventKey(String eventKey) {
        this.eventKey = eventKey;
    }

    /**
     * @param ticket the ticket to set
     */
    public void setTicket(String ticket) {
        this.ticket = ticket;
    }

    /**
     * @param latitude the latitude to set
     */
    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    /**
     * @param longitude the longitude to set
     */
    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    /**
     * @param precision the precision to set
     */
    public void setPrecision(Double precision) {
        this.precision = precision;
    }

}
